import './resetLayer.css';
const layer = window.layer;
let Notice = {
    normal:function(options){
        options['skin'] = 'layer-oms-skin';
        layer.open(options);
    },
    tips:function(msg,obj){
        obj.focus();
        layer.tips(msg, obj,{
            tips: [1, '#f56b6b']
        });
       
    },
    errorTips:function(msg){
        layer.msg(msg, {
            skin:'layui-msg-error'
        });
    },
    successTips:function(msg){
        layer.msg(msg, {
            skin:'layui-msg-success'
        });
    },
    closeAll:function(){
        layer.closeAll();
    },
    isEmpty:function(obj){
        for(var i = 0; i < obj.length; i++){
            if(obj[i].val === "" || obj[i].val === undefined){
                this.tips(obj[i].msg,obj[i].item);
                return false;
            }
        }
        return true;
    },
}

export {layer,Notice};